home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / BaseClasses / streams.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  6.5 KB  |  170 lines

  1. //------------------------------------------------------------------------------
  2. // File: Streams.h
  3. //
  4. // Desc: DirectShow base classes - defines overall streams architecture.
  5. //
  6. // Copyright (c) 1992-2001 Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9.  
  10. #ifndef __STREAMS__
  11. #define __STREAMS__
  12.  
  13. // disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
  14. #pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
  15. #pragma warning(disable:4127) // warning C4127: conditional expression is constant
  16. #pragma warning(disable:4189) // warning C4189: local variable is initialized but not referenced
  17. #pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
  18. #pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
  19. #pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
  20. #pragma warning(disable:4514) // warning C4514: unreferenced inline function has been removed
  21. #pragma warning(disable:4710) // warning C4710: 'function' not inlined
  22.  
  23. #ifdef  _MSC_VER
  24. #if _MSC_VER>=1100
  25. #define AM_NOVTABLE __declspec(novtable)
  26. #else
  27. #define AM_NOVTABLE
  28. #endif
  29. #endif  // MSC_VER
  30.  
  31.  
  32. #include <windows.h>
  33. #include <windowsx.h>
  34. #include <olectl.h>
  35. #include <ddraw.h>
  36. #include <mmsystem.h>
  37.  
  38. #ifndef NUMELMS
  39.    #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
  40. #endif
  41.  
  42. ///////////////////////////////////////////////////////////////////////////
  43. // The following definitions come from the Platform SDK and are required if
  44. // the applicaiton is being compiled with the headers from Visual C++ 6.0.
  45. ///////////////////////////////////////////////////////////////////////////
  46. #ifndef InterlockedExchangePointer
  47.     #define InterlockedExchangePointer(Target, Value) \
  48.    (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
  49. #endif
  50.  
  51. #ifndef _WAVEFORMATEXTENSIBLE_
  52. #define _WAVEFORMATEXTENSIBLE_
  53. typedef struct {
  54.     WAVEFORMATEX    Format;
  55.     union {
  56.         WORD wValidBitsPerSample;       /* bits of precision  */
  57.         WORD wSamplesPerBlock;          /* valid if wBitsPerSample==0 */
  58.         WORD wReserved;                 /* If neither applies, set to zero. */
  59.     } Samples;
  60.     DWORD           dwChannelMask;      /* which channels are */
  61.                                         /* present in stream  */
  62.     GUID            SubFormat;
  63. } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
  64. #endif // !_WAVEFORMATEXTENSIBLE_
  65.  
  66. #if !defined(WAVE_FORMAT_EXTENSIBLE)
  67. #define  WAVE_FORMAT_EXTENSIBLE                 0xFFFE
  68. #endif // !defined(WAVE_FORMAT_EXTENSIBLE)
  69.  
  70. #ifndef GetWindowLongPtr
  71.   #define GetWindowLongPtrA   GetWindowLongA
  72.   #define GetWindowLongPtrW   GetWindowLongW
  73.   #ifdef UNICODE
  74.     #define GetWindowLongPtr  GetWindowLongPtrW
  75.   #else
  76.     #define GetWindowLongPtr  GetWindowLongPtrA
  77.   #endif // !UNICODE
  78. #endif // !GetWindowLongPtr
  79.  
  80. #ifndef SetWindowLongPtr
  81.   #define SetWindowLongPtrA   SetWindowLongA
  82.   #define SetWindowLongPtrW   SetWindowLongW
  83.   #ifdef UNICODE
  84.     #define SetWindowLongPtr  SetWindowLongPtrW
  85.   #else
  86.     #define SetWindowLongPtr  SetWindowLongPtrA
  87.   #endif // !UNICODE
  88. #endif // !SetWindowLongPtr
  89.  
  90. #ifndef GWLP_WNDPROC
  91.   #define GWLP_WNDPROC        (-4)
  92. #endif
  93. #ifndef GWLP_HINSTANCE
  94.   #define GWLP_HINSTANCE      (-6)
  95. #endif
  96. #ifndef GWLP_HWNDPARENT
  97.   #define GWLP_HWNDPARENT     (-8)
  98. #endif
  99. #ifndef GWLP_USERDATA
  100.   #define GWLP_USERDATA       (-21)
  101. #endif
  102. #ifndef GWLP_ID
  103.   #define GWLP_ID             (-12)
  104. #endif
  105. #ifndef DWLP_MSGRESULT
  106.   #define DWLP_MSGRESULT  0
  107. #endif
  108. #ifndef DWLP_DLGPROC 
  109.   #define DWLP_DLGPROC    DWLP_MSGRESULT + sizeof(LRESULT)
  110. #endif
  111. #ifndef DWLP_USER
  112.   #define DWLP_USER       DWLP_DLGPROC + sizeof(DLGPROC)
  113. #endif
  114. ///////////////////////////////////////////////////////////////////////////
  115. // End Platform SDK definitions
  116. ///////////////////////////////////////////////////////////////////////////
  117.  
  118.  
  119. #pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
  120. #include <strmif.h>     // Generated IDL header file for streams interfaces
  121.  
  122. #include <reftime.h>    // Helper class for REFERENCE_TIME management
  123. #include <wxdebug.h>    // Debug support for logging and ASSERTs
  124. #include <amvideo.h>    // ActiveMovie video interfaces and definitions
  125.  
  126. //include amaudio.h explicitly if you need it.  it requires the DX SDK.
  127. //#include <amaudio.h>    // ActiveMovie audio interfaces and definitions
  128.  
  129. #include <wxutil.h>     // General helper classes for threads etc
  130. #include <combase.h>    // Base COM classes to support IUnknown
  131. #include <dllsetup.h>   // Filter registration support functions
  132. #include <measure.h>    // Performance measurement
  133. #include <comlite.h>    // Light weight com function prototypes
  134.  
  135. #include <cache.h>      // Simple cache container class
  136. #include <wxlist.h>     // Non MFC generic list class
  137. #include <msgthrd.h>    // CMsgThread
  138. #include <mtype.h>      // Helper class for managing media types
  139. #include <fourcc.h>     // conversions between FOURCCs and GUIDs
  140. #include <control.h>    // generated from control.odl
  141. #include <ctlutil.h>    // control interface utility classes
  142. #include <evcode.h>     // event code definitions
  143. #include <amfilter.h>   // Main streams architecture class hierachy
  144. #include <transfrm.h>   // Generic transform filter
  145. #include <transip.h>    // Generic transform-in-place filter
  146. #include <uuids.h>      // declaration of type GUIDs and well-known clsids
  147. #include <source.h> // Generic source filter
  148. #include <outputq.h>    // Output pin queueing
  149. #include <errors.h>     // HRESULT status and error definitions
  150. #include <renbase.h>    // Base class for writing ActiveX renderers
  151. #include <winutil.h>    // Helps with filters that manage windows
  152. #include <winctrl.h>    // Implements the IVideoWindow interface
  153. #include <videoctl.h>   // Specifically video related classes
  154. #include <refclock.h>   // Base clock class
  155. #include <sysclock.h>   // System clock
  156. #include <pstream.h>    // IPersistStream helper class
  157. #include <vtrans.h>     // Video Transform Filter base class
  158. #include <amextra.h>
  159. #include <cprop.h>      // Base property page class
  160. #include <strmctl.h>    // IAMStreamControl support
  161. #include <edevdefs.h>   // External device control interface defines
  162. #include <audevcod.h>   // audio filter device error event codes
  163.  
  164. #else
  165.     #ifdef DEBUG
  166.     #pragma message("STREAMS.H included TWICE")
  167.     #endif
  168. #endif // __STREAMS__
  169.  
  170.